import Layout from '../components/Layout.vue'
let routes = [{
        path: '/',
        component: Layout,
        meta: {
            title: '首页',
            icon: 'el-icon-s-home',
        },
        children: [{
                path: 'home',
                meta: {
                    title: '首页',
                    icon: 'el-icon-s-home',
                },
                component: () =>
                    import ('../components/Home.vue'),
            },
            {
                path: 'user',
                meta: {
                    title: '用户',
                    icon: 'el-icon-s-custom',
                },
                component: () =>
                    import ('../components/User.vue'),
            },
        ],
    },
    {
        path: '/system',
        component: Layout,
        name: 'system',
        meta: {
            title: '设置',
            icon: 'el-icon-s-tools',
        },
        children: [{
            path: 'user',
            meta: {
                title: '用户设置',
                icon: 'el-icon-s-custom',
            },
            component: () =>
                import ('../views/user.vue'),
        }, ],
    },
    {
        path: '/login',
        component: () =>
            import ('../views/login.vue'),
        meta: {
            title: '登录',
            hidden: true,
        },
    },
]

export default routes